package org.point.service.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.point.common.service.impl.BaseServiceImpl;
import org.point.common.util.DoPage;
import org.point.dao.UsersDao;
import org.point.dao.impl.UsersDaoImpl;
import org.point.domain.ProductType;
import org.point.domain.Users;
import org.point.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.ModelAndView;

/**
 * @ClassName: ConvertRuleDetailServiceImpl  
 * @Description: TODO(这里用一句话描述这个类的作用)  
 * @author Kenny_Z' szqiuk@gmail.com
 * @date 2016年10月23日 下午4:02:01
 */
@Service("UsersService")
public class UsersServiceImpl extends BaseServiceImpl<Users, Serializable> implements UsersService {
	
	@Autowired
	private UsersDao dao;

	public List<Users> findUsersList(DoPage<Users> page) {
		List<Users> records = dao.searchForUsers(page);
		return records;
	}

	public Integer countUsersForPage(DoPage<Users> page) {
		Integer result = dao.searchForUsersCount(page);
		return result;
	}

	public List<Users> findUsersList(Integer currentPage,
			Map<String, Object> map) {
		DoPage<Users> page = new DoPage<Users>();
		dao.searchForUsers(page);
		return null;
	}

	public List<Users> findUsersList(Map<String, Object> map) {
	    List<Users> records = dao.searchUsers(map);
		return records;
	}

	public DoPage<Users> searchCRForPage(DoPage<Users> page) {
		List<Users> records = dao.searchForUsers(page);
		Integer totalRecords = dao.searchForUsersCount(page);
		page.setList(records);
		page.setTotalRecords(totalRecords);
		return page;
	}

	
}
